home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Format CD 44
/
Amiga Format CD44 (1999-08-26)(Future Publishing)(GB)(Track 1 of 3)[!][issue 1999-10].iso
/
-in_the_mag-
/
basics
/
prime_tests
/
primes3000.bb2.text
< prev
next >
Wrap
Text File
|
1999-07-24
|
383b
|
26 lines
; This program finds the prime-numbers from 2 To 3000
; N.B, Use TimeCMD as Blitz 2 lacks the TIMER function
DEFTYPE.w
Print "prime numbers from 2 to 3000:"
BeginTime=TIMER
Print BeginTime
For a = 2 To 3000
For b = 3 To a-1
If (a MOD b) = 0 Then Goto NotPrim
Next b
; Print a
NotPrim
Next a
Print "time needed:"+Str$(TIMER-BeginTime)+" s."
MouseWait